﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Text.RegularExpressions;

namespace JCode.Common
{
    public class Text
    {
      
        #region 高效字符串连接操作 public static string JoinString(params string[] value)
        /// <summary>
        /// 高效字符串连接操作。
        /// </summary>
        /// <param name="value">要连接的字符串</param>
        /// <returns>连接后的字符串</returns>
        public static string JoinString(params string[] value)
        {
            if (null == value)
            {
                throw new System.ArgumentNullException("value");
            }
            if (0 == value.Length)
            {
                return string.Empty;
            }
            return string.Join(string.Empty, value);
        }
        #endregion
        #region 生成指定长度的字符串,即生成strLong个str字符串
        /// <summary>
        /// 生成指定长度的字符串,即生成strLong个str字符串
        /// </summary>
        /// <param name="strLong">生成的长度</param>
        /// <param name="str">以str生成字符串</param>
        /// <returns></returns>
        public static string StringOfChar(int strLong, string str)
        {
            string ReturnStr = "";
            for (int i = 0; i < strLong; i++)
            {
                ReturnStr += str;
            }

            return ReturnStr;
        }
        #endregion
        

    }
}
